///////////////////////////////////////////////////////////////////////////
//
// The XmppConnection class is used to create a connection to an XMPP server. 
//
///////////////////////////////////////////////////////////////////////////

#ifndef INCLUDED_XMPPCONNECTION_H
#define INCLUDED_XMPPCONNECTION_H

#include <string>
#include "socket.h"

namespace tinkle {

class XmppConnection {
public:
    XmppConnection(const std::string &host = "talk.google.com",
        const std::string &port = "5222",
        const std::string &serviceName = "google.com"
    );
    ~XmppConnection();

    int Connect();
    int Disconnect();
    int Login(const std::string &user, const std::string &pwd);

    std::string GetHost();
    std::string GetPort();

private:
    std::string _host;
    std::string _port;
    std::string _serviceName;
    Socket *_sock;

};

}   //namespace tinkle

#endif